<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>业务输出</title>
    <%@ include file="../common/meta.jsp" %>
    <link href="${ctx}/css/page/common-list.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/page/common-search.css?t=${now}" rel="stylesheet">
    <style>
    </style>
    <script>
        var searchInfo = ${searchInfo};
        var statusMap = ${statusMap};
    </script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight" id="vue">
    <div class="tabs-container">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-search"></i> 筛选查询</h5>
                    </div>
                    <div class="ibox-content ibox-content-search">
                        <form class="form-horizontal m-t" id="searchForm" novalidate="novalidate">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">查询业务：</label>
                                <div class="col-sm-5">
                                    <input type="text" name="bizName" onkeydown="if(event.keyCode==13){doRefresh();return false;}" id="bizName" class="form-control"  placeholder="输入业务名称" maxlength="30"
                                           value="${not empty searchInfo ? searchInfo.bizName : ''}">
                                </div>
                                <label class="col-sm-1 control-label">状态：</label>
                                <div class="col-sm-2">
                                    <select class="form-control" name="status" id="status" onchange="doRefresh()">
                                        <option value="">--请选择--</option>
                                        <c:forEach items="${statusMap}" var="item">
                                            <option value="${item.key}" ${not empty searchInfo && searchInfo.status == item.key? 'selected' : '' } >${item.value}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                <div class="ibox-tools ibox-tools-search">
                                    <button type="button" class="btn btn-primary btn-outline" onclick="doRefresh()">查询</button>
                                    <button type="button" class="btn btn-primary btn-outline" onclick="clearFrom('searchForm')">重置</button>
                                    <button type="button" class="btn btn-primary btn-outline" onclick="openSearchTools();"><i class="fa fa-caret-down"></i></button>
                                </div>
                            </div>
                            <div class="search-tools">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">查询栏目：</label>
                                    <div class="col-sm-5">
                                        <input type="text" name="columnName" onkeydown="if(event.keyCode==13){doRefresh();return false;}" id="columnName" class="form-control"  placeholder="输入栏目名称" maxlength="30"
                                               value="${not empty searchInfo ? searchInfo.columnName : ''}">
                                    </div>
                                    <label class="col-sm-1 control-label">服务商：</label>
                                    <div class="col-sm-5">
                                        <div class="input-group">
                                            <input type="hidden" id="isvPid" name="isvPid" value="${not empty searchInfo ? searchInfo.isvPid : ''}">
                                            <input type="text" id="isvName" name="isvName" class="form-control" placeholder="请输入服务商" :value="outputInfo.isvName">
                                            <div class="input-group-btn">
                                                <button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">
                                                    <span class="caret"></span>
                                                </button>
                                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">服务项：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="bizCode" id="bizCode" onchange="doRefresh()">
                                            <option value="">--请选择--</option>
                                            <c:forEach items="${cBizMap}" var="item">
                                                <option value="${item.code}" ${not empty searchInfo && searchInfo.bizCode == item.code? 'selected' : '' } >${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">城市：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="cityCode" id="cityCode" onchange="doRefresh()">
                                            <option value="">--请选择--</option>
                                            <c:forEach items="${cityMap}" var="item">
                                                <option value="${item.code}" ${not empty searchInfo && searchInfo.cityCode == item.code? 'selected' : '' } >${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">关联一级科室：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="deptCode" id="deptCode" onchange="doRefresh()">
                                            <option value="">--请选择--</option>
                                            <c:forEach items="${deptMap}" var="item">
                                                <option value="${item.code}" ${not empty searchInfo && searchInfo.deptCode == item.code? 'selected' : '' } >${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-3">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-table"></i> 输出平台</h5>
                    </div>
                    <div class="ibox-content">
                        <table class='table table-striped table-hover'
                               id="leftTable"
                               data-toggle="table"
                               data-url="${ctx}/output/pageFindDictData?t=${now}"
                               data-pagination="false"
                               data-side-pagination="server"
                               data-striped="true"
                               data-response-handler="handleServerResult"
                               data-query-params-type=""
                               data-page-size="${defaultPageSize}"
                               data-page-list="${pageList}">
                            <thead>
                            <tr>
                                <th data-field="code" data-visible="false">dictCode</th>
                                <th data-field="name" data-align="center" data-formatter="initCheck">输出平台</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
            <div class="col-sm-9" style="padding-left: 0px;">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <div class="ibox-tools col-sm-offset-2">
                            <c:if test="${userType == 'super' || not empty btnMap['addOutput']}">
                                <button class="btn btn-primary btn-outline" onclick="openAddOutputPage()">新增</button>
                            </c:if>
                            <c:if test="${userType == 'super' || not empty btnMap['editOutput']}">
                                <button class="btn btn-primary btn-outline" onclick="openEditOutputPage()">编辑</button>
                            </c:if>
                            <c:if test="${userType == 'super' || not empty btnMap['stateOutput']}">
                                <button class="btn btn-primary btn-outline" id="_setStateBtn" onclick="setState()">上架</button>
                            </c:if>
                            <c:if test="${userType == 'super' || not empty btnMap['delOutput']}">
                                <button class="btn btn-primary btn-outline" onclick="deleteOutput()">删除</button>
                            </c:if>
                            <button class="btn btn-primary btn-outline" onclick="doRefresh()">刷新</button>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class='table table-striped table-hover'
                               id="dataTable"
                               data-toggle="table"
                               data-url="${ctx}/output/pageFindOutputData?t=${now}"
                               data-pagination="true"
                               data-side-pagination="server"
                               data-striped="true"
                               data-response-handler="handleServerResult"
                               data-query-params-type=""
                               data-query-params="getParams"
                               data-page-number="${not empty searchInfo.pageNo ? searchInfo.pageNo : 1}"
                               data-page-size="${not empty searchInfo.pageSize ? searchInfo.pageSize : defaultPageSize}"
                               data-page-list="${pageList}">
                            <thead>
                            <tr>
                                <th data-field="destType" data-visible="false">destType</th>
                                <th data-field="status" data-formatter="formatStatus" data-align="center" data-width="90px">状态</th>
                                <th data-field="id" data-align="center" data-width="90px">业务ID</th>
                                <th data-field="bizName" data-align="center" data-width="120px">业务</th>
                                <th data-field="cBizName" data-align="center" data-width="120px">业务服务项</th>
                                <th data-field="columnName" data-align="center" data-width="120px">栏目名称</th>
                                <th data-field="grade" data-formatter="formatGrade" data-align="center" data-width="120px">栏目等级</th>
                                <th data-field="sortNum" data-align="center" data-width="90px">排序</th>
                                <th data-field="operator" data-align="center" data-width="120px">创建人</th>
                                <th data-field="gmtCreate" data-align="center" data-width="120px">创建时间</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="text-center">${companyName}</div>
            </div>
        </div>
    </div>
</div>
<script src="${ctx}/js/output/outputMgr.js?t=${now}"></script>
</body>
</html>

